from django.shortcuts import render
from rest_framework.viewsets import ModelViewSet

from goods.models import CommodityInfos
from goods.serializer import CommodityInfosSerializer


class GoodSViewSet(ModelViewSet):
    queryset = CommodityInfos.objects.all()
    serializer_class = CommodityInfosSerializer

    filterset_fields = ['name']
